package ressource;

import java.sql.Timestamp;

public class CadreSouhait {

	private int idAnnonce;
	private float prix;
	private Timestamp date;
	private String commentaire;
	
	public int getIdAnnonce() {
		return idAnnonce;
	}
	public void setIdAnnonce(int idAnnonce) {
		this.idAnnonce = idAnnonce;
	}
	public float getPrix() {
		return prix;
	}
	public void setPrix(float prix) {
		this.prix = prix;
	}
	public String getDate() {
		if(date == null) return null;
		else{
			String[] buffer = date.toString().split("[- :]");
			return buffer[2] + "/" + buffer[1] + "/" + buffer[0] + " " + buffer[3] + "h" + buffer[4];
		}
	}
	public void setDate(Timestamp date) {
		this.date = date;
	}
	public String getCommentaire() {
		return commentaire;
	}
	public void setCommentaire(String commentaire) {
		this.commentaire = commentaire;
	}
}
